<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>六西格玛知识管理</title>
<link href="<?php echo $this->baseUrl ?>/public/style/style.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseUrl ?>/public/style/daterangepicker.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseUrl ?>/public/style/jquery-ui.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/scripts/jquery.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/scripts/daterangepicker.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/scripts/jquery-ui.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/fckeditor/fckeditor.js"></script>
</head>
<td><?php $uid = $val['user_id']; $group_id = $_SESSION['user']['group_id'];$user_id = $_SESSION['user']['user_id'];?><div class="console"><a href="<?php echo $this->baseUrl ?>/project/edit?project_id=<?php echo $val['project_id']; ?>" class="edit" <?php if(($uid!=$user_id)&&($group_id!=5)){ ?>onclick="alert('您没有权限修改！');return false;" <?php }?> >修改</a> <a href="<?php echo $this->baseUrl ?>/project/delete?project_id=<?php echo $val['project_id']; ?>" class="delete" <?php if(($uid!=$user_id)&&($group_id!=5)){ ?>onclick="alert('您没有权限删除！');return false;" <?php }else{?> onClick="return confirm('您确定要删除吗？')?true:false;" <?php }?>>删除</a></div></td>
<body>
<!--头部-->
<?php echo $this->partial('common/header.html', array('template'=>$this->template, 'baseUrl'=>$this->baseUrl)) ?>

<!--主体-->
<div class="main-box" id="mainBox">
    <div class="third-menu">
        <?php echo $this->partial('common/operation.html', array('template'=>$this->template,'uid'=>$this->course[0]['user_id'], 'baseUrl'=>$this->baseUrl, 'id'=>$_GET['course_id'])) ?>
        <div class="menu-title"><span class="icon"></span>课程详细信息页</div>
	</div>
  
	<div class="separate-line"></div>
	<div class="main-form">
        <div class="project-show">
            <h2 class="project-title"><?php echo $this->course[0]['name']; ?></h2>
            <div class="project-info">
            </div>
            <!--div class="project-key">
                <span>项目评分：8.5</span>
                <span>关键字：<?php echo $this->course[0]['key']; ?></span>
            </div-->
            <div class="project-desc">
            	<div class="project-border">
            	<?php echo !empty($this->course[0]['summary'])?$this->course[0]['summary']:'暂无信息'; ?>
                </div>
            </div>
        </div>
        
        <?php if($this->courseprojects): ?>
        <div class="project-show">
        	<div class="project-desc">
            <div class="project-border">
                <dl class="class-info">
                    <dd>
                    <table width="760">
                    <tr align="center">
                    	<th>相关案例</th>
                    	<th width="25%">操作</th>
                    </tr>
                    <?php foreach ($this->courseprojects as $key => $val): ?>
                        <tr align="center">
                        	<td><a href="<?php echo $this->baseUrl ?>/project/detail?project_id=<?php echo $val['project_id']; ?>" target="_blank"><?php echo $val['title']; ?></a></td>
                            <td><a href="<?php echo $this->baseUrl ?>/course/deleteproject?project_id=<?php echo $val['project_id'];?>&course_id=<?php echo $_GET['course_id'];?>" >删除项目</a></td>
                        </tr>
                    <?php endforeach; ?>
                    </table>
                    </dd>
                </dl>
          <div class="page-bar2">
                <div>总数：<span class="total-count"><?php echo $this->course_total ?></span></div>
                <div>
                <?php if ($this->course_page > 1): ?>
                <a href="<?php echo $this->baseUrl ?>/course/detail?course_id=<?php echo $this->course[0]['course_id']; ?>&course_page=1">首页</a>
                <?php else: ?>
                首页
                <?php endif; ?>
                <?php if ($this->course_page > 1): ?>
                <a href="<?php echo $this->baseUrl ?>/course/detail?course_id=<?php echo $this->course[0]['course_id']; ?>course_page=<?php echo $this->course_page-1 ?>">上一页</a>
                <?php else: ?>
                上一页
                <?php endif; ?>
                <?php if ($this->course_page < $this->course_pages): ?>
                <a href="<?php echo $this->baseUrl ?>/course/detail?course_id=<?php echo $this->course[0]['course_id']; ?>&course_page=<?php echo $this->course_page+1 ?>">下一页</a>
                <?php else: ?>
                下一页
                <?php endif; ?>
                <?php if ($this->course_page < $this->course_pages): ?>
                <a href="<?php echo $this->baseUrl ?>/course/detail?course_id=<?php echo $this->course[0]['course_id']; ?>&course_page=<?php echo $this->course_pages ?>">尾页</a>
                <?php else: ?>
                尾页
                <?php endif; ?>
                </div>
                <div>页数：<span class="page-detail"><?php echo $this->course_page ?>/<?php echo $this->course_pages ?></span></div>
          	</div>
            </div>
            </div>
            
        </div>

        <?php endif; ?>
         <?php if($this->coursefiles): ?>
        <div class="project-show">
        	<div class="project-desc">
            <div class="project-border">
                <dl class="class-info">
                    <dd>
                    <table width="760">
                    <tr align="center">
                    	<th>项目相关文档</th>
                    	<th width="25%">操作</th>
                    </tr>
                    <?php foreach ($this->coursefiles as $key => $val): ?>
                        <tr align="center">
                        	<td><a href="<?php echo $this->baseUrl ?>/<?php echo $val['path']; ?>" target="_blank"><?php echo $val['file_name']; ?></a></td>
                            <td><a href="<?php echo $this->baseUrl ?>/course/deletefile?file_id=<?php echo $val['file_id'];?>&course_id=<?php echo $_GET['course_id'];?>" >删除附件</a></td>
                        </tr>
                    <?php endforeach; ?>
                    </table>
                    </dd>
                </dl>
          <div class="page-bar2">
                <div>总数：<span class="total-count"><?php echo $this->file_total ?></span></div>
                <div>
                <?php if ($this->file_page > 1): ?>
                <a href="<?php echo $this->baseUrl ?>/course/detail?course_id=<?php echo $this->course[0]['course_id']; ?>&file_page=1">首页</a>
                <?php else: ?>
                首页
                <?php endif; ?>
                <?php if ($this->file_page > 1): ?>
                <a href="<?php echo $this->baseUrl ?>/course/detail?course_id=<?php echo $this->course[0]['course_id']; ?>file_page=<?php echo $this->file_page-1 ?>">上一页</a>
                <?php else: ?>
                上一页
                <?php endif; ?>
                <?php if ($this->file_page < $this->file_pages): ?>
                <a href="<?php echo $this->baseUrl ?>/course/detail?course_id=<?php echo $this->course[0]['course_id']; ?>&file_page=<?php echo $this->file_page+1 ?>">下一页</a>
                <?php else: ?>
                下一页
                <?php endif; ?>
                <?php if ($this->file_page < $this->file_pages): ?>
                <a href="<?php echo $this->baseUrl ?>/course/detail?course_id=<?php echo $this->course[0]['course_id']; ?>&file_page=<?php echo $this->file_pages ?>">尾页</a>
                <?php else: ?>
                尾页
                <?php endif; ?>
                </div>
                <div>页数：<span class="page-detail"><?php echo $this->file_page ?>/<?php echo $this->file_pages ?></span></div>
          	</div>
            </div>
            </div>
            
        </div>

        <?php endif; ?>
      
        
        <div class="mod-comment">
            <div class="head">评论</div>
            <p class="line"></p>
            <?php if($this->comments): ?>
          	<ul class="comment-list">
            	<?php foreach ($this->comments as $key => $val): ?>
                <li>
                    <span class="user"><?php echo $val['teacher_name'];?>：</span>
                    <span class="score">评分：<font color="#CC0000"><?php echo $val['level']; ?></font></span>
                    <span class="recommend">推荐：
                    <?php 
                    	if($val['recommend']==0){
                        	echo '未选择';
                        }elseif($val['recommend']==1){
                        	echo "<font color='green'>推荐</font>";
                        }elseif($val['recommend']==2){
                        	echo "<font color='red'>不推荐</font>";
                        }
                    ?>
                    </span>
                    <span class="time">评论时间：<i><?php echo date('Y-m-d H:i:s',$val['create_time']); ?></i></span>
                    <div class="content">
                    <?php echo $val['content']; ?>
                    </div>
                </li>
                <?php endforeach; ?>
            </ul>
          	<div class="page-bar">
                <div>总数：<span class="total-count"><?php echo $this->total ?></span></div>
                <div>
                <?php if ($this->page > 1): ?>
                <a href="<?php echo $this->baseUrl ?>/course/detail?course_id=<?php echo $this->course[0]['course_id']; ?>&page=1">首页</a>
                <?php else: ?>
                首页
                <?php endif; ?>
                <?php if ($this->page > 1): ?>
                <a href="<?php echo $this->baseUrl ?>/course/detail?course_id=<?php echo $this->course[0]['course_id']; ?>&page=<?php echo $this->page-1 ?>">上一页</a>
                <?php else: ?>
                上一页
                <?php endif; ?>
                <?php if ($this->page < $this->pages): ?>
                <a href="<?php echo $this->baseUrl ?>/course/detail?course_id=<?php echo $this->course[0]['course_id']; ?>&page=<?php echo $this->page+1 ?>">下一页</a>
                <?php else: ?>
                下一页
                <?php endif; ?>
                <?php if ($this->page < $this->pages): ?>
                <a href="<?php echo $this->baseUrl ?>/course/detail?course_id=<?php echo $this->course[0]['course_id']; ?>&page=<?php echo $this->pages ?>">尾页</a>
                <?php else: ?>
                尾页
                <?php endif; ?>
                </div>
                <div>页数：<span class="page-detail"><?php echo $this->page ?>/<?php echo $this->pages ?></span></div>
          	</div>
            <?php endif; ?>
          
          	<div class="comment-form">
                <form method="post" name="form_commend" action="<?php echo $this->baseUrl?>/comment/add">
                <div class="desc">
                    <input type="hidden" name="cid" value="<?php echo $this->course[0]['course_id'];?>" />
                    <input type="hidden" name="category" value="5" />
                    <input type="hidden" name="template" value="<?php echo $this->template?>" />
                    <span class="float-right">
                        <label for="recommend">推荐：</label>
                        <select name="recommend" class="input-text">
                            <option>请选择...</option>
                            <option value="1">推荐</option>
                            <option value="2">不推荐</option>
                        </select>
                    </span>
                    <label for="score">评分：</label>
                    <select name="score" class="input-text">
                    	<?php foreach ($this->conf->score as $key => $val): ?>
                        <option value="<?php echo $val; ?>"><?php echo $val; ?></option>
                        <?php endforeach; ?>
                    </select>
                </div>
                <p class="content">
                    <label for="content">评论内容：</label>
                    <textarea name="content" class="input-textarea"></textarea>
                </p>
                <p><input type="submit" class="button" value="确认提交" style="margin-left:0" /></p>
            	</form>
          	</div>
        </div>
	</div>
</div>


<!--底部-->
<?php echo $this->partial('common/footer.html') ?>
</body>
</html>
